﻿using System;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using StructureMap;

namespace Seeker.Controllers
{
    public class IoCControllerFactory : DefaultControllerFactory
    {
        protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
        {
            if (controllerType != null)
            {
                return ObjectFactory.GetInstance(controllerType) as IController;
            }
            else
            {
                return null;
            }
        }
    }
}
